html {
  font-size: 16px;
}

body {
  width: 100vw;
  height: 100vh;
  background-color: #f5f5f5;
}

.home-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.header {
  margin-top: 2rem;
}

.header-primary {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333333;
}

.header-secondary {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #999999;
}

.content {
  margin-top: 2rem;
  width: 320px;
  height: 320px;
  border: 1px solid #666;
  perspective: 500px;
  position: relative;
  display: flex;
}

/* 左门右门的共有样式 */
.content-left-door,
.content-right-door {
  width: 50%;
  height: 100%;
  background-color: rgb(194, 37, 37);
  transition: 1.2s;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #333;
}

/* 设置旋转元素的基点，左边大门以左侧为基准点旋转 */
.content-left-door {
  transform-origin: left;
}

/* 设置旋转元素的基点，右边大门以右侧为基准点旋转 */
.content-right-door {
  transform-origin: right;
}

/* 当鼠标悬浮的时候，设置开门的幅度，左门往左侧开 */
.content:hover .content-left-door {
  transform: rotateY(-130deg);
}

/* 右门往右侧开 */
.content:hover .content-right-door {
  transform: rotateY(130deg);
}

/* 内容区的定位层级稍微低一些 */
.content-container {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  /* background-color: #abf; */
  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(-45deg, #dae, #cc2, #3c9, #09f, #66f);
  background-size: 200% 200%;
  animation: gradient 4s ease infinite;
}

.content-text {
  /* 本例12个文字(加标点符号)；有多少个文字，width就是多少个em */
  width: 12em;
  /* 加上两个动画，一个是打字动画，使用steps让字一个一个的出现，
             注意step和字数保持一致，光标动画也是同理，*/
  animation: typingWords 8s steps(12) infinite, cursor 0.5s steps(1) infinite;
  /* 要设置不允许换行，且溢出隐藏 */
  white-space: nowrap;
  overflow: hidden;
}

.footer {
  margin-bottom: 2rem;
}

.footer-link {
  font-size: 0.8rem;
  color: #999999;
}

@keyframes typingWords {
  0% {
    width: 0;
  }
}

@keyframes cursor {
  50% {
    border-color: transparent;
  }
}

@keyframes gradient {
  0% {
    background-position: 0 12%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0 12%;
  }
}
